<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.prime.com.tr/ui" xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets" template="/template/main.xhtml">

	<ui:define name="body">
		<p:fieldset legend="#{messages['register.label']}">
			<h:form>
				<h:panelGrid columns="2">
				
					<h:outputLabel for="username" value="#{messages['user.label.username']}" />
					<h:inputText id="username" value="#{userEditMB.bean.username}" />
					
					<h:outputLabel for="firstName" value="#{messages['user.label.firstName']}" />
					<h:inputText id="firstName" value="#{userEditMB.bean.firstName}"/>

					<h:outputLabel for="lastName" value="#{messages['user.label.lastName']}" />
					<h:inputText id="lastName" value="#{userEditMB.bean.lastName}" />									
					
					<h:outputLabel for="email" value="#{messages['user.label.email']}" />
					<h:inputText id="email" value="#{userEditMB.bean.eMail}" />

				</h:panelGrid>
				<p:fieldset legend="#{messages['address.label']}">				
					<h:panelGrid columns="2">											
							<h:outputLabel for="street" value="#{messages['address.label.street']}" />
							<h:inputText id="street" value="#{userEditMB.bean.address.street}" />									
							
							<h:outputLabel for="complement" value="#{messages['address.label.complement']}" />
							<h:inputText id="complement" value="#{userEditMB.bean.address.complement}" />
							
							<h:outputLabel for="city" value="#{messages['address.label.city']}" />
							<h:inputText id="city" value="#{userEditMB.bean.address.city}" />
							
							<h:outputLabel for="state" value="#{messages['address.label.state']}" />					
							<h:inputText id="state" value="#{userEditMB.bean.address.state}" />
							
							<h:outputLabel for="zip" value="#{messages['address.label.zip']}" />
							<h:inputText id="zip" value="#{userEditMB.bean.address.zip}" />
																											
							<h:outputLabel for="country" value="#{messages['address.label.country']}" />
							<h:inputText id="country" value="#{userEditMB.bean.address.country}" />						
					</h:panelGrid>			
				</p:fieldset>
				
				<h:panelGrid columns="2">									

					<h:outputLabel for="password1" value="#{messages['register.password1']}" />
					<h:inputSecret id="password1" value="#{userEditMB.password1}" />			
					
					<h:outputLabel for="password2" value="#{messages['register.password2']}" />
					<h:inputSecret id="password2" value="#{userEditMB.password2}" />									
					
					<p:spacer />					
					<p:spacer />
					<h:commandButton value="#{messages['register.doregister']}" action="#{userEditMB.insert}" />				

				</h:panelGrid>
			</h:form>
		</p:fieldset>
		
	</ui:define>

</ui:composition>